package com.smfx.yxt.common;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public final class GlobalMap {
	
	public static Map<String, GlobalValue> caches = new ConcurrentHashMap<String, GlobalValue>();
	
	public static void put(String key, Object value) {
		put(key, value, 0);
	}
	
	public static void put(String key, Object value, long mills) {
		GlobalValue newValue = new GlobalValue(key, value, mills * 1000 );
		caches.put(key, newValue);
	}
	
	public static GlobalValue get(String key) {
		return caches.get(key);
	}
	
	public static void remove(String key) {
		caches.remove(key);
	}

}
